package myinterface

import "fmt"

type Student struct {
	Name string
	Note string
}

func (s *Student) PrintNote() {
	fmt.Println(s.Note)
}

func (s *Student) Read() string {
	return s.Note
}

func (s *Student) Write(note string) {
	s.Note = note
}

func (s *Student) SetName(name string) {
	s.Name = name
}

func (s *Student) ReturnName() string {
	return s.Name
}

type Student2 struct {
	Name string
	Note string
}

func (s *Student2) ReturnName() string {
	panic("implement me")
}

func (s *Student2) SetName(string) {
	panic("implement me")
}

func (s *Student2) Read() string {
	panic("implement me")
}

func (s *Student2) Write(string) {
	panic("implement me")
}

func (s *Student2) PrintNote() {
	panic("implement me")
}

func (s *Student2) String() string {
	return fmt.Sprintf("student2's Name:%s Note:%s", s.Name, s.Note)
}

type Teacher struct {
	Name string
}

func (t *Teacher) SetName(name string) {
	t.Name = name
}

func (t *Teacher) ReturnName() string {
	return t.Name
}

type People interface {
	ReturnName() string
	SetName(s string)
	//Samefunc() //copy扩展了People又扩展了Study，如果People与Study声明了相同的方法，则Copy接口会存在重复定义Samefunc的问题
}

type Study interface {
	Read() string
	Write(string)
	//Samefunc()
}

type Copy interface {
	People
	Study
	PrintNote()
}
